package com.atguigu.gmall.cart.api;

import com.atguigu.gmall.cart.pojo.Cart;
import com.atguigu.gmall.common.bean.ResponseVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @description:
 * @author: xie.zh
 * @create: 2021.04.01   09:20
 * @version: 1.0
 */
public interface GmallCartApi {

    @GetMapping("{userId}")
    @ResponseBody
    public ResponseVo deleteCartByUserIdFromMysql(@PathVariable("userId") String userId);


    /**
     * 根据用户id查询购物选中状态的购物记录
     *
     * @param userId
     * @return
     */
    @GetMapping("check/{userId}")
    @ResponseBody
    public ResponseVo<List<Cart>> queryUserCartWithCheck(@PathVariable("userId") Long userId);
}
